home *** CD-ROM | disk | FTP | other *** search
/ Cubase Magazine 56 / Issue #56.iso / mac / 2-SOFTWARE / Sibelius 2 Demo / Extras / Set as Sibelius file < prev   
Text File  |  2002-05-20  |  750b  |  34 lines

  1. (*
  2.     To use, save this script as an Application, then drop the files you wish to convert onto it
  3. *)
  4.  
  5. on run
  6.     tell application "Finder"
  7.         set theList to selection
  8.         if (count items in theList) = 1 then
  9.             if class of item 1 of theList is application file then
  10.                 if name of (info for (theList as alias)) is "Set as Sibelius file" then
  11.                     set theList to {}
  12.                 end if
  13.             end if
  14.         end if
  15.     end tell
  16.     MakeAppleAliases(theList)
  17. end run
  18.  
  19. on open theList
  20.     MakeAppleAliases(theList)
  21. end open
  22.  
  23. on MakeAppleAliases(theList)
  24.     tell application "Finder"
  25.         repeat with x in theList
  26.             try
  27.                 set the file type of x to "SIBL"
  28.                 set the creator type of x to "SIBE"
  29.             on error
  30.                 error "There was an error"
  31.             end try
  32.         end repeat
  33.     end tell
  34. end MakeAppleAliases